#ifndef MAINVIEW_H
#define MAINVIEW_H

#include "libs/extension/extensiontype.h"
#include <QPointer>
#include <QWidget>

QT_BEGIN_NAMESPACE
class QStackedWidget;
QT_END_NAMESPACE

class Analyser;
class Comparer;
class LiveRecorder;
class LocalDictionaryEditor;
class ScreenCapture;
class SettingsView;

class MainView : public QWidget
{
    Q_OBJECT
public:
    explicit MainView(QWidget* parent = nullptr);
    ~MainView();

    void requestStop(const yc::ResolveCallback& resolve, const yc::RejectCallback& reject);
    void stop();

private:
    void setupUi();

    QStackedWidget* stacked_widget_;
    QPointer<LiveRecorder> recorder_;
    QPointer<Analyser> analyser_;
    QPointer<ScreenCapture> screen_capture_;
    QPointer<Comparer> comparer_;
    QPointer<LocalDictionaryEditor> local_dict_editor_;
    QPointer<SettingsView> settings_view_;
};

#endif // MAINVIEW_H
